using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using WHXK;
using System.Data.SqlClient;
using System.Web.Configuration ;
namespace Web
{
    public partial class home : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                BindGrid();
            }
        }
        protected void BindGrid()
        {
            WHXK.ClientVisitInfo cv = new ClientVisitInfo();
            DataSet ds = new DataSet();
            if (cv.getAllClientVisitInfo(ref ds, "top 4", "visit_id desc"))
            {
                this.grdClientVisit.DataSource = ds;
                this.grdClientVisit.DataBind();
            }
            WHXK.ClientComplaintInfo cci = new ClientComplaintInfo();
            DataSet ds1 = new DataSet();
            if (cci.getAllClientComplaintInfo(ref ds1, "top 4", "complaint_id desc"))
            {
                this.grdClientComplaint.DataSource = ds1;
                this.grdClientComplaint.DataBind();
            }
            WHXK.NewsInfo ni = new NewsInfo();
            DataSet ds2 = new DataSet();
            if (ni.getAllNewsInfo(ref ds2, "top 4", "news_posetime desc"))
            {
                this.grdNews.DataSource = ds2;
                this.grdNews.DataBind();
            } 
            WHXK.OtherHouseInfo ohi = new OtherHouseInfo();
            DataSet ds3 = new DataSet();
            if (ohi.getAllOtherHouseInfo(ref ds3, "top 4","otherhouse_id desc"))
            {
                this.grdOrtherHouse.DataSource = ds3;
                this.grdOrtherHouse.DataBind();
            }




        }
    }
}
